<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
			<li><a href="{:url('Label/add')}">添加</a></li>
		</ul>
		<div class="js-check-wrap">
			<ul class="nav nav-tabs slider">
				<volist name="countryData" id="vo">
					<li <if condition="$vo.id eq $langId"> class="active" </if> ><a data-toggle="tab" data-id="{$vo.id}">{$vo.name}</a></li>
				</volist>
			</ul>
		</div>
		<form method="post" class="js-ajax-form" action="{:url('Label/listOrder')}">
            <div class="table-actions">
                <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
            </div>
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                        <th width="50">{:lang('SORT')}</th>
						<th>ID</th>
						<th>名称</th>
						<th>中文名称</th>
						<th>颜色</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
                        <td>
                            <input name="list_orders[{$vo.id}]" class="input-order" type="text" value="{$vo.list_order}">
                        </td>
						<td>{$vo['id']}</td>
						<td>{$vo['name']}</td>
						<td>{$vo['name_cn']}</td>
						<td><div style="width:50px;height:20px;background:{$vo['colour']};"></div></td>
						<td>	
                            <a class="btn btn-xs btn-primary" href='{:url("Label/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Label/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
        (function(){
            $('li a').click(function () {
                window.location = '{:url("/admin/label/index")}?langId=' + $(this).data('id');
            });
        })()
	</script>
</body>
</html>